<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>metisMenu Events</title>

    <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/css/bootstrap.min.css">
    <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css">

    <link rel="stylesheet" href="metisMenu.min.css">
    <link rel="stylesheet" href="demo.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.4.1/themes/prism.min.css">
    <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script> <![endif]-->
    <style media="screen">
      html {
        height: 100%;
        width: 100%;
      }

    </style>
  </head>
  <body>
    <nav class="navbar navbar-default navbar-static-top" role="navigation">
      <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
          <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="index.html">metisMenu</a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
          <ul class="nav navbar-nav">
            <li><a href="index.html">Vertical Menu</a></li>
            <li><a href="metisFolder.html">Folder View</a></li>
            <li><a href="hover.html">Hover Option For Desktop</a></li>
            <li><a href="zurb.html">Foundation | Zurb</a></li>
            <li><a href="animate.html">Animate</a></li>
            <li class="active"><a href="event.html">Event</a></li>
          </ul>
        </div>
        <!-- /.navbar-collapse -->
      </div>
      <!-- /.container-fluid -->
    </nav>

    <div class="clearfix">
      <aside class="sidebar">
        <nav class="sidebar-nav">
          <ul class="metismenu" id="menu">
            <li class="active">
              <a href="#" aria-expanded="true">
                <span class="sidebar-nav-item-icon fa fa-github fa-lg"></span>
                <span class="sidebar-nav-item">metisMenu</span>
                <span class="fa arrow"></span>
              </a>
              <ul aria-expanded="true">
                <li>
                  <a href="https://github.com/onokumus/metisMenu">
                    <span class="sidebar-nav-item-icon fa fa-code-fork"></span>
                    Fork
                  </a>
                </li>
                <li>
                  <a href="https://github.com/onokumus/metisMenu">
                    <span class="sidebar-nav-item-icon fa fa-star"></span>
                    Star
                  </a>
                </li>
                <li>
                  <a href="https://github.com/onokumus/metisMenu/issues">
                    <span class="sidebar-nav-item-icon fa fa-exclamation-triangle"></span>
                    Issues
                  </a>
                </li>
              </ul>
            </li>
            <li>
              <a href="#" aria-expanded="false">
                Menu 1<span class="fa arrow"></span>
              </a>
              <ul aria-expanded="false">
                <li>
                  <a href="#">Sub Menu 1</a>
                  <ul class="animated bounceIn">
                    <li>
                      <a href="#">item</a>
                    </li>
                  </ul>
                </li>
                <li>
                  <a href="#">Sub Menu 2</a>
                  <ul>
                    <li>
                      <a href="#">item</a>
                    </li>
                  </ul>
                </li>
              </ul>
            </li>

          </ul>
        </nav>
      </aside>
      <section class="content">
        <div class="col-xs-12">
          <h3>Events
            <small>thanks <a href="https://github.com/needim/">needim</a>
              <a href="https://github.com/needim/noty/" target="_blank">noty</a>
            </small>
          </h3>
          <div class="panel panel-default">
            <div class="panel-heading">
              Code
              <span class="pull-right">
                <span class="fa fa-code"></span>
              </span>
            </div>
            <div class="panel-body">
              <pre><code class="language-javascript">
$(function() {

  $('#menu').metisMenu()
  .on('show.metisMenu', function(event) {

      // do something…

  }).on('shown.metisMenu', function(event) {

    // do something…

  }).on('hide.metisMenu', function(event) {

    // do something…

  }).on('hidden.metisMenu', function(event) {

    // do something…

  });
});
              </code></pre>

            </div>
          </div>
        </div>
      </section>
    </div>

    <script src="jquery/dist/jquery.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-noty/2.3.8/packaged/jquery.noty.packaged.min.js" charset="utf-8"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-noty/2.3.8/layouts/topRight.min.js" charset="utf-8"></script>
    <script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/js/bootstrap.min.js"></script>
    <script src="metisMenu.js"></script>

    <script>
      $(function() {

        $('#menu').metisMenu().on('show.metisMenu', function(event) {
          noty({
            text: function() {
              return $(event.target).parent('li').children('a').html() + 'opening ...';
            },
            layout: 'topRight',
            type: 'information',
            theme: 'relax',

            timeout: 1000
          });
        }).on('shown.metisMenu', function(event) {
          noty({
            text: function() {
              return $(event.target).parent('li').children('a').html() + 'opened';
            },
            layout: 'topRight',
            type: 'success',
            theme: 'relax',
            timeout: 3000
          });
        }).on('hide.metisMenu', function(event) {
          noty({
            text: function() {
              return $(event.target).parent('li').children('a').html() + 'collapsing ...';
            },
            layout: 'topRight',
            type: 'warning',
            theme: 'relax',
            timeout: 1000
          });
        }).on('hidden.metisMenu', function(event) {
          noty({
            text: function() {
              return $(event.target).parent('li').children('a').html() + 'collapsed';
            },
            layout: 'topRight',
            type: 'error',
            theme: 'relax',
            timeout: 3000
          });
        });

      });
    </script>

    <script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.4.1/prism.min.js"></script>
  </body>
</html>
